import * as React from 'react';

import './index.scss';

import renderMd from '../../utils/markdown';

type MarkdownProps = {
  md: string;
};

export class Markdown extends React.Component<MarkdownProps> {
  render() {
    const { md } = this.props;
    return <div className="x-md" dangerouslySetInnerHTML={{ __html: renderMd(md) }} />;
  }
}
